home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3 / X11 / XrmUniqueQuark.z / XrmUniqueQuark
Encoding:
Text File  |  1998-10-30  |  8.6 KB  |  199 lines

  1.  
  2.  
  3.  
  4.      XXXXrrrrmmmmUUUUnnnniiiiqqqquuuueeeeQQQQuuuuaaaarrrrkkkk((((3333XXXX11111111))))XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....3333))))XXXXrrrrmmmmUUUUnnnniiiiqqqquuuueeeeQQQQuuuuaaaarrrrkkkk((((3333XXXX11111111))))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.           XrmUniqueQuark, XrmStringToQuark, XrmPermStringToQuark,
  10.           XrmQuarkToString, XrmStringToQuarkList,
  11.           XrmStringToBindingQuarkList - manipulate resource quarks
  12.  
  13.      SSSSYYYYNNNNTTTTAAAAXXXX
  14.           XrmQuark XrmUniqueQuark()
  15.  
  16.           #define XrmStringToName(string) XrmStringToQuark(string)
  17.           #define XrmStringToClass(string) XrmStringToQuark(string)
  18.           #define XrmStringToRepresentation(string)
  19.           XrmStringToQuark(string)
  20.  
  21.           XrmQuark XrmStringToQuark(_s_t_r_i_n_g)
  22.                char *_s_t_r_i_n_g;
  23.  
  24.           XrmQuark XrmPermStringToQuark(_s_t_r_i_n_g)
  25.                char *_s_t_r_i_n_g;
  26.  
  27.           #define XrmStringToName(string) XrmStringToQuark(string)
  28.           #define XrmStringToClass(string) XrmStringToQuark(string)
  29.           #define XrmStringToRepresentation(string)
  30.           XrmStringToQuark(string)
  31.  
  32.           XrmQuark XrmStringToQuark(_s_t_r_i_n_g)
  33.                char *_s_t_r_i_n_g;
  34.  
  35.           XrmQuark XrmPermStringToQuark(_s_t_r_i_n_g)
  36.                char *_s_t_r_i_n_g;
  37.  
  38.           #define XrmNameToString(name) XrmQuarkToString(name) #define
  39.           XrmClassToString(class) XrmQuarkToString(class) #define
  40.           XrmRepresentationToString(type) XrmQuarkToString(type)
  41.  
  42.           char *XrmQuarkToString(_q_u_a_r_k)
  43.                XrmQuark _q_u_a_r_k;
  44.  
  45.           #define XrmStringToNameList(str, name)
  46.           XrmStringToQuarkList((str), (name)) #define
  47.           XrmStringToClassList(str,class) XrmStringToQuarkList((str),
  48.           (class))
  49.  
  50.           void XrmStringToQuarkList(_s_t_r_i_n_g, _q_u_a_r_k_s__r_e_t_u_r_n)
  51.                char *_s_t_r_i_n_g;
  52.                XrmQuarkList _q_u_a_r_k_s__r_e_t_u_r_n;
  53.  
  54.           XrmStringToBindingQuarkList(_s_t_r_i_n_g, _b_i_n_d_i_n_g_s__r_e_t_u_r_n,
  55.           _q_u_a_r_k_s__r_e_t_u_r_n)
  56.                char *_s_t_r_i_n_g;
  57.                XrmBindingList _b_i_n_d_i_n_g_s__r_e_t_u_r_n;
  58.                XrmQuarkList _q_u_a_r_k_s__r_e_t_u_r_n;
  59.  
  60.  
  61.  
  62.  
  63.      Page 1                                          (printed 4/30/98)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      XXXXrrrrmmmmUUUUnnnniiiiqqqquuuueeeeQQQQuuuuaaaarrrrkkkk((((3333XXXX11111111))))XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....3333))))XXXXrrrrmmmmUUUUnnnniiiiqqqquuuueeeeQQQQuuuuaaaarrrrkkkk((((3333XXXX11111111))))
  71.  
  72.  
  73.  
  74.      AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
  75.           _b_i_n_d_i_n_g_s__r_e_t_u_r_n
  76.                     Returns the binding list.
  77.  
  78.           _q_u_a_r_k     Specifies the quark for which the equivalent
  79.                     string is desired.
  80.  
  81.           _q_u_a_r_k_s__r_e_t_u_r_n
  82.                     Returns the list of quarks.
  83.  
  84.           _s_t_r_i_n_g    Specifies the string for which a quark or quark
  85.                     list is to be allocated.
  86.  
  87.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  88.           The _X_r_m_U_n_i_q_u_e_Q_u_a_r_k function allocates a quark that is
  89.           guaranteed not to represent any string that is known to the
  90.           resource manager.
  91.  
  92.           These functions can be used to convert from string to quark
  93.           representation.  If the string is not in the Host Portable
  94.           Character Encoding, the conversion is implementation-
  95.           dependent.  The string argument to _X_r_m_S_t_r_i_n_g_T_o_Q_u_a_r_k need not
  96.           be permanently allocated storage.  _X_r_m_P_e_r_m_S_t_r_i_n_g_T_o_Q_u_a_r_k is
  97.           just like _X_r_m_S_t_r_i_n_g_T_o_Q_u_a_r_k, except that Xlib is permitted to
  98.           assume the string argument is permanently allocated, and,
  99.           hence, that it can be used as the value to be returned by
  100.           _X_r_m_Q_u_a_r_k_T_o_S_t_r_i_n_g.
  101.  
  102.           For any given quark, if _X_r_m_S_t_r_i_n_g_T_o_Q_u_a_r_k returns a non-NULL
  103.           value, all future calls will return the same value
  104.           (identical address).
  105.  
  106.           These functions can be used to convert from quark
  107.           representation to string.  The string pointed to by the
  108.           return value must not be modified or freed.  The returned
  109.           string is byte-for-byte equal to the original string passed
  110.           to one of the string-to-quark routines.  If no string exists
  111.           for that quark, _X_r_m_Q_u_a_r_k_T_o_S_t_r_i_n_g returns NULL.  For any
  112.           given quark, if _X_r_m_Q_u_a_r_k_T_o_S_t_r_i_n_g returns a non-NULL value,
  113.           all future calls will return the same value (identical
  114.           address).
  115.  
  116.           These functions can be used to convert from string to quark
  117.           representation.  If the string is not in the Host Portable
  118.           Character Encoding, the conversion is implementation-
  119.           dependent.  The string argument to _X_r_m_S_t_r_i_n_g_T_o_Q_u_a_r_k need not
  120.           be permanently allocated storage.  _X_r_m_P_e_r_m_S_t_r_i_n_g_T_o_Q_u_a_r_k is
  121.           just like _X_r_m_S_t_r_i_n_g_T_o_Q_u_a_r_k, except that Xlib is permitted to
  122.           assume the string argument is permanently allocated, and,
  123.           hence, that it can be used as the value to be returned by
  124.           _X_r_m_Q_u_a_r_k_T_o_S_t_r_i_n_g.
  125.  
  126.  
  127.  
  128.  
  129.      Page 2                                          (printed 4/30/98)
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.      XXXXrrrrmmmmUUUUnnnniiiiqqqquuuueeeeQQQQuuuuaaaarrrrkkkk((((3333XXXX11111111))))XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....3333))))XXXXrrrrmmmmUUUUnnnniiiiqqqquuuueeeeQQQQuuuuaaaarrrrkkkk((((3333XXXX11111111))))
  137.  
  138.  
  139.  
  140.           For any given quark, if _X_r_m_S_t_r_i_n_g_T_o_Q_u_a_r_k returns a non-NULL
  141.           value, all future calls will return the same value
  142.           (identical address).
  143.  
  144.           The _X_r_m_S_t_r_i_n_g_T_o_Q_u_a_r_k_L_i_s_t function converts the null-
  145.           terminated string (generally a fully qualified name) to a
  146.           list of quarks.  Note that the string must be in the valid
  147.           ResourceName format (see section 15.1).  If the string is
  148.           not in the Host Portable Character Encoding, the conversion
  149.           is implementation-dependent.
  150.  
  151.           A binding list is a list of type _X_r_m_B_i_n_d_i_n_g_L_i_s_t and
  152.           indicates if components of name or class lists are bound
  153.           tightly or loosely (that is, if wildcarding of intermediate
  154.           components is specified).
  155.  
  156.           typedef enum {XrmBindTightly, XrmBindLoosely} XrmBinding, *XrmBindingList;
  157.  
  158.           _X_r_m_B_i_n_d_T_i_g_h_t_l_y indicates that a period separates the
  159.           components, and _X_r_m_B_i_n_d_L_o_o_s_e_l_y indicates that an asterisk
  160.           separates the components.
  161.  
  162.           The _X_r_m_S_t_r_i_n_g_T_o_B_i_n_d_i_n_g_Q_u_a_r_k_L_i_s_t function converts the
  163.           specified string to a binding list and a quark list.  If the
  164.           string is not in the Host Portable Character Encoding the
  165.           conversion is implementation-dependent.  Component names in
  166.           the list are separated by a period or an asterisk character.
  167.           If the string does not start with period or asterisk, a
  168.           period is assumed.  For example, ``*a.b*c'' becomes:
  169.  
  170.           quarks a       b      c
  171.           bindings       loose  tightloose
  172.  
  173.      SSSSEEEEEEEE AAAALLLLSSSSOOOO
  174.           XrmGetResource(3X11), XrmInitialize(3X11),
  175.           XrmMergeDatabases(3X11), XrmPutResource(3X11)
  176.           _X_l_i_b - _C _L_a_n_g_u_a_g_e _X _I_n_t_e_r_f_a_c_e
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.      Page 3                                          (printed 4/30/98)
  196.  
  197.  
  198.  
  199.